package com.kmsoft.provider.facade.api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
public class ProviderApiFacade implements ProviderApi {

    @Value("${spring.application.name:}")
    private String applicationName;

    @Override
    public String call(@PathVariable(value = "name") String name) {
        log.info("================local service:{} has called by service:{} success", applicationName, name);
        return applicationName;
    }
}
